/**
 *
 * @description:tab切换
 * @author:junyong.hong
 * @createTime:2017/12/7
 * @version:1.0.0.0
 * @history:
 *    1、
 *    2、
 *
 */
define([
    'angularAMD',
    'config'
], function (angularAMD, app) {
    app.provider('directiveRouter', function ($stateProvider, $urlRouterProvider) {

        this.$get = function () {
            var service, CURRENT_PATH = 'components/module/directive/';

            service = {
                'setRouter': function () {
                    $stateProvider
                        // 鼠标事件
                        .state('index.touchTest', angularAMD.route({
                            url:'/touchTest',
                            templateUrl:CURRENT_PATH + 'touchTest/touch.html',
                            controllerAs:'vm',
                            controllerUrl:CURRENT_PATH + 'touchTest/touch.controller.js',
                            controller:'touch.controller'
                        }))

                        // 第一个指令
                        .state('index.firstTest', angularAMD.route({
                            url:'/firstTest',
                            templateUrl:CURRENT_PATH + 'firstTest/firstTest.html',
                            controllerAs:'vm',
                            controllerUrl:CURRENT_PATH + 'firstTest/firstTest.controller.js',
                            controller:'firstTest.controller'
                        }))

                        // @单向文本绑定
                        .state('index.oneWayTest', angularAMD.route({
                            url:'/oneWayTest',
                            templateUrl:CURRENT_PATH + 'oneWayTest/oneWayTest.html',
                            controllerAs:'vm',
                            controllerUrl:CURRENT_PATH + 'oneWayTest/oneWayTest.controller.js',
                            controller:'oneWayTest.controller'
                        }))

                        // =双向文本绑定
                        .state('index.twoWayTest', angularAMD.route({
                            url:'/twoWayTest',
                            templateUrl:CURRENT_PATH + 'twoWayTest/twoWayTest.html',
                            controllerAs:'vm',
                            controllerUrl:CURRENT_PATH + 'twoWayTest/twoWayTest.controller.js',
                            controller:'twoWayTest.controller'
                        }))

                        // @调用父级作用域
                        .state('index.parentTest', angularAMD.route({
                            url:'/parentTest',
                            templateUrl:CURRENT_PATH + 'parentTest/parentTest.html',
                            controllerAs:'vm',
                            controllerUrl:CURRENT_PATH + 'parentTest/parentTest.controller.js',
                            controller:'parentTest.controller'
                        }))
                }
            };
            return service;
        }
    }).run(function (directiveRouter) {
        directiveRouter.setRouter();
    });
});
